package com.training.file;

import java.io.File;
import java.io.IOException;

public class CurrentDir {
	
	private final String test;
	
	public CurrentDir( String test) {
		this.test =  
			test;
	}
	
	
	public static void main(String args[]) {
		String dir = "user.dir"; // set to current directory
		try {
			dir = new File(System.getProperty(dir)).getCanonicalPath();

			File file = new File("");
			  System.out.println (file.getCanonicalPath());
		}

		catch (IOException e1) { /* handler required but null */
		}
		System.out.println(System.getProperty(dir) + "Current dir : " + dir);

	}
}